# import requests

# url = "https://aitest.anta.com/aimodels-server/private/llm/v1/chat/completions"
# headers = {
#     "Content-Type": "application/json",
#     "Authorization": "Bearer 13e4f58b26442955cb0caff045831b50"
# }
# data = {
#     "model": "gpt-4.1",
#     "messages": [{'role':'system','content':'You are a helpful assistant.'},
#         {"role": "user", "content": "把张三的信息放json：王五  33岁 籍贯上海，仅仅输出json格式，json的键用合适的英文代替，值用上述给出的内容，并且去除结果中的\n换行标志"}],
#     "stream":False,
#     "temperature":0.1
# }
# response = requests.post(url, headers=headers, json=data)
# print(response.json())

from openai import OpenAI
client = OpenAI(api_key="13e4f58b26442955cb0caff045831b50", base_url="https://aitest.anta.com")
response = client.chat.completions.create(
    model="gpt-4.1",
    messages=[
        {"role": "system", "content": "You are a helpful assistant."},
        {"role": "user", "content": "把张三的信息放json：王五  33岁 籍贯上海，仅仅输出json格式，json的键用合适的英文代替，值用上述给出的内容，并且去除结果中的\n换行标志"}
    ],
    stream=False,
    temperature=0.1
)
print(response.choices[0].message.content)